package com.aserbao.aserbaosandroid.functions.database.greenDao.db;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.feizhi.inventory.database.AllData;
import com.feizhi.inventory.database.HistoryDetails;
import com.feizhi.inventory.database.ItemDetails;
import com.feizhi.inventory.database.Key;
import com.feizhi.inventory.database.Task;
import com.feizhi.inventory.database.TaskDetails;
import com.feizhi.inventory.database.myData;

import com.aserbao.aserbaosandroid.functions.database.greenDao.db.AllDataDao;
import com.aserbao.aserbaosandroid.functions.database.greenDao.db.HistoryDetailsDao;
import com.aserbao.aserbaosandroid.functions.database.greenDao.db.ItemDetailsDao;
import com.aserbao.aserbaosandroid.functions.database.greenDao.db.KeyDao;
import com.aserbao.aserbaosandroid.functions.database.greenDao.db.TaskDao;
import com.aserbao.aserbaosandroid.functions.database.greenDao.db.TaskDetailsDao;
import com.aserbao.aserbaosandroid.functions.database.greenDao.db.myDataDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig allDataDaoConfig;
    private final DaoConfig historyDetailsDaoConfig;
    private final DaoConfig itemDetailsDaoConfig;
    private final DaoConfig keyDaoConfig;
    private final DaoConfig taskDaoConfig;
    private final DaoConfig taskDetailsDaoConfig;
    private final DaoConfig myDataDaoConfig;

    private final AllDataDao allDataDao;
    private final HistoryDetailsDao historyDetailsDao;
    private final ItemDetailsDao itemDetailsDao;
    private final KeyDao keyDao;
    private final TaskDao taskDao;
    private final TaskDetailsDao taskDetailsDao;
    private final myDataDao myDataDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        allDataDaoConfig = daoConfigMap.get(AllDataDao.class).clone();
        allDataDaoConfig.initIdentityScope(type);

        historyDetailsDaoConfig = daoConfigMap.get(HistoryDetailsDao.class).clone();
        historyDetailsDaoConfig.initIdentityScope(type);

        itemDetailsDaoConfig = daoConfigMap.get(ItemDetailsDao.class).clone();
        itemDetailsDaoConfig.initIdentityScope(type);

        keyDaoConfig = daoConfigMap.get(KeyDao.class).clone();
        keyDaoConfig.initIdentityScope(type);

        taskDaoConfig = daoConfigMap.get(TaskDao.class).clone();
        taskDaoConfig.initIdentityScope(type);

        taskDetailsDaoConfig = daoConfigMap.get(TaskDetailsDao.class).clone();
        taskDetailsDaoConfig.initIdentityScope(type);

        myDataDaoConfig = daoConfigMap.get(myDataDao.class).clone();
        myDataDaoConfig.initIdentityScope(type);

        allDataDao = new AllDataDao(allDataDaoConfig, this);
        historyDetailsDao = new HistoryDetailsDao(historyDetailsDaoConfig, this);
        itemDetailsDao = new ItemDetailsDao(itemDetailsDaoConfig, this);
        keyDao = new KeyDao(keyDaoConfig, this);
        taskDao = new TaskDao(taskDaoConfig, this);
        taskDetailsDao = new TaskDetailsDao(taskDetailsDaoConfig, this);
        myDataDao = new myDataDao(myDataDaoConfig, this);

        registerDao(AllData.class, allDataDao);
        registerDao(HistoryDetails.class, historyDetailsDao);
        registerDao(ItemDetails.class, itemDetailsDao);
        registerDao(Key.class, keyDao);
        registerDao(Task.class, taskDao);
        registerDao(TaskDetails.class, taskDetailsDao);
        registerDao(myData.class, myDataDao);
    }
    
    public void clear() {
        allDataDaoConfig.clearIdentityScope();
        historyDetailsDaoConfig.clearIdentityScope();
        itemDetailsDaoConfig.clearIdentityScope();
        keyDaoConfig.clearIdentityScope();
        taskDaoConfig.clearIdentityScope();
        taskDetailsDaoConfig.clearIdentityScope();
        myDataDaoConfig.clearIdentityScope();
    }

    public AllDataDao getAllDataDao() {
        return allDataDao;
    }

    public HistoryDetailsDao getHistoryDetailsDao() {
        return historyDetailsDao;
    }

    public ItemDetailsDao getItemDetailsDao() {
        return itemDetailsDao;
    }

    public KeyDao getKeyDao() {
        return keyDao;
    }

    public TaskDao getTaskDao() {
        return taskDao;
    }

    public TaskDetailsDao getTaskDetailsDao() {
        return taskDetailsDao;
    }

    public myDataDao getMyDataDao() {
        return myDataDao;
    }

}
